<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateYeepayDistrictsTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::create('yeepay_districts', function (Blueprint $table) {
            $table->id();
            $table->timestamps();
            $table->integer('province_code')->index()->comment('省编码');
            $table->string('province_name', 32)->comment('省名称');
            $table->integer('city_code')->index()->comment('市编码');
            $table->string('city_name', 32)->comment('市名称');
            $table->integer('district_code')->index()->comment('区编码');
            $table->string('district_name', 32)->comment('区名称');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('yeepay_districts');
    }
}
